#ifndef SQLPARSER_INSERT_STATEMENT_H
#define SQLPARSER_INSERT_STATEMENT_H

#include "SQLStatement.h"
#include "statSelect.h"

namespace ment {
	enum InsertType {
		kInsertValues,
		kInsertSelect
	};

	struct InsertStatement : SQLStatement {
		InsertStatement(InsertType type);
		virtual ~InsertStatement();
		virtual std::string execute(std::string username = "default");

	

		InsertType type;
		char* schema;
		char* tableName;
		std::vector<char*>* columns;
		std::vector<Stat*>* values;
		SelectStatement* select;

		//9.13
		std::vector<std::pair<std::string, std::pair<int, int>>>* colPos = nullptr;
		std::vector<std::pair<int, int>>* valuePos;  // 每个 value 坐标

		// 9.13 备用：记录 VALUES 语句的位置，用于 fallback
		int valuesLine = -1;
		int valuesColumn = -1;

	};

} // namsepace ment

#endif
